\(\int (c e+d e x)^3 (a+b \arctan (c+d x)) \, dx\) [1]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 72 \[ \int (c e+d e x)^3 (a+b \arctan (c+d x)) \, dx=\frac {1}{4} b e^3 x-\frac {b e^3 (c+d x)^3}{12 d}-\frac {b e^3 \arctan (c+d x)}{4 d}+\frac {e^3 (c+d x)^4 (a+b \arctan (c+d x))}{4 d} \]

[Out]

1/4*b*e^3*x-1/12*b*e^3*(d*x+c)^3/d-1/4*b*e^3*arctan(d*x+c)/d+1/4*e^3*(d*x+c)^4*(a+b*arctan(d*x+c))/d

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {5151, 12, 4946, 308, 209} \[ \int (c e+d e x)^3 (a+b \arctan (c+d x)) \, dx=\frac {e^3 (c+d x)^4 (a+b \arctan (c+d x))}{4 d}-\frac {b e^3 \arctan (c+d x)}{4 d}-\frac {b e^3 (c+d x)^3}{12 d}+\frac {1}{4} b e^3 x \]

[In]

Int[(c*e + d*e*x)^3*(a + b*ArcTan[c + d*x]),x]

[Out]

(b*e^3*x)/4 - (b*e^3*(c + d*x)^3)/(12*d) - (b*e^3*ArcTan[c + d*x])/(4*d) + (e^3*(c + d*x)^4*(a + b*ArcTan[c +
d*x]))/(4*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 5151

Int[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d, Subst[I
nt[(f*(x/d))^m*(a + b*ArcTan[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[d*e - c*f, 0
] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int e^3 x^3 (a+b \arctan (x)) \, dx,x,c+d x\right )}{d} \\ & = \frac {e^3 \text {Subst}\left (\int x^3 (a+b \arctan (x)) \, dx,x,c+d x\right )}{d} \\ & = \frac {e^3 (c+d x)^4 (a+b \arctan (c+d x))}{4 d}-\frac {\left (b e^3\right ) \text {Subst}\left (\int \frac {x^4}{1+x^2} \, dx,x,c+d x\right )}{4 d} \\ & = \frac {e^3 (c+d x)^4 (a+b \arctan (c+d x))}{4 d}-\frac {\left (b e^3\right ) \text {Subst}\left (\int \left (-1+x^2+\frac {1}{1+x^2}\right ) \, dx,x,c+d x\right )}{4 d} \\ & = \frac {1}{4} b e^3 x-\frac {b e^3 (c+d x)^3}{12 d}+\frac {e^3 (c+d x)^4 (a+b \arctan (c+d x))}{4 d}-\frac {\left (b e^3\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,c+d x\right )}{4 d} \\ & = \frac {1}{4} b e^3 x-\frac {b e^3 (c+d x)^3}{12 d}-\frac {b e^3 \arctan (c+d x)}{4 d}+\frac {e^3 (c+d x)^4 (a+b \arctan (c+d x))}{4 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.78 \[ \int (c e+d e x)^3 (a+b \arctan (c+d x)) \, dx=\frac {e^3 \left (-\frac {1}{4} b \left (-d x+\frac {1}{3} (c+d x)^3+\arctan (c+d x)\right )+\frac {1}{4} (c+d x)^4 (a+b \arctan (c+d x))\right )}{d} \]

[In]

Integrate[(c*e + d*e*x)^3*(a + b*ArcTan[c + d*x]),x]

[Out]

(e^3*(-1/4*(b*(-(d*x) + (c + d*x)^3/3 + ArcTan[c + d*x])) + ((c + d*x)^4*(a + b*ArcTan[c + d*x]))/4))/d

Maple [A] (verified)

Time = 5.70 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.89

method result size
derivativedivides \(\frac {\frac {e^{3} a \left (d x +c \right )^{4}}{4}+e^{3} b \left (\frac {\left (d x +c \right )^{4} \arctan \left (d x +c \right )}{4}-\frac {\left (d x +c \right )^{3}}{12}+\frac {d x}{4}+\frac {c}{4}-\frac {\arctan \left (d x +c \right )}{4}\right )}{d}\) \(64\)
default \(\frac {\frac {e^{3} a \left (d x +c \right )^{4}}{4}+e^{3} b \left (\frac {\left (d x +c \right )^{4} \arctan \left (d x +c \right )}{4}-\frac {\left (d x +c \right )^{3}}{12}+\frac {d x}{4}+\frac {c}{4}-\frac {\arctan \left (d x +c \right )}{4}\right )}{d}\) \(64\)
parts \(\frac {e^{3} a \left (d x +c \right )^{4}}{4 d}+\frac {e^{3} b \left (\frac {\left (d x +c \right )^{4} \arctan \left (d x +c \right )}{4}-\frac {\left (d x +c \right )^{3}}{12}+\frac {d x}{4}+\frac {c}{4}-\frac {\arctan \left (d x +c \right )}{4}\right )}{d}\) \(66\)
parallelrisch \(\frac {3 d^{5} e^{3} b \arctan \left (d x +c \right ) x^{4}+3 x^{4} a \,d^{5} e^{3}+12 b c \,d^{4} e^{3} \arctan \left (d x +c \right ) x^{3}+12 x^{3} a c \,d^{4} e^{3}+18 x^{2} \arctan \left (d x +c \right ) b \,c^{2} d^{3} e^{3}-x^{3} b \,d^{4} e^{3}+18 x^{2} a \,c^{2} d^{3} e^{3}+12 x \arctan \left (d x +c \right ) b \,c^{3} d^{2} e^{3}-3 x^{2} b c \,d^{3} e^{3}+12 x a \,c^{3} d^{2} e^{3}+3 \arctan \left (d x +c \right ) b \,c^{4} d \,e^{3}-3 x b \,c^{2} d^{2} e^{3}-42 a \,c^{4} d \,e^{3}+9 b \,c^{3} d \,e^{3}+3 x b \,d^{2} e^{3}-18 d \,e^{3} c^{2} a -3 e^{3} b \arctan \left (d x +c \right ) d -3 b c d \,e^{3}}{12 d^{2}}\) \(252\)
risch \(\frac {i e^{3} d^{2} b c \,x^{3} \ln \left (1-i \left (d x +c \right )\right )}{2}+\frac {i e^{3} d^{3} b \,x^{4} \ln \left (1-i \left (d x +c \right )\right )}{8}+\frac {i e^{3} b \,c^{3} x \ln \left (1-i \left (d x +c \right )\right )}{2}+\frac {3 i e^{3} d b \,c^{2} x^{2} \ln \left (1-i \left (d x +c \right )\right )}{4}+\frac {e^{3} a \,d^{3} x^{4}}{4}-\frac {i e^{3} \left (d x +c \right )^{4} b \ln \left (1+i \left (d x +c \right )\right )}{8 d}+\frac {3 e^{3} a \,c^{2} d \,x^{2}}{2}+\frac {i e^{3} b \,c^{4} \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{16 d}-\frac {b \,e^{3} \arctan \left (d x +c \right )}{4 d}-\frac {e^{3} b \,d^{2} x^{3}}{12}+e^{3} c^{3} a x +e^{3} a c \,d^{2} x^{3}-\frac {e^{3} b \,c^{2} x}{4}-\frac {e^{3} b c d \,x^{2}}{4}+\frac {e^{3} b \,c^{4} \arctan \left (d x +c \right )}{8 d}+\frac {b \,e^{3} x}{4}\) \(276\)

[In]

int((d*e*x+c*e)^3*(a+b*arctan(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/4*e^3*a*(d*x+c)^4+e^3*b*(1/4*(d*x+c)^4*arctan(d*x+c)-1/12*(d*x+c)^3+1/4*d*x+1/4*c-1/4*arctan(d*x+c)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (64) = 128\).

Time = 0.26 (sec) , antiderivative size = 151, normalized size of antiderivative = 2.10 \[ \int (c e+d e x)^3 (a+b \arctan (c+d x)) \, dx=\frac {3 \, a d^{4} e^{3} x^{4} + {\left (12 \, a c - b\right )} d^{3} e^{3} x^{3} + 3 \, {\left (6 \, a c^{2} - b c\right )} d^{2} e^{3} x^{2} + 3 \, {\left (4 \, a c^{3} - b c^{2} + b\right )} d e^{3} x + 3 \, {\left (b d^{4} e^{3} x^{4} + 4 \, b c d^{3} e^{3} x^{3} + 6 \, b c^{2} d^{2} e^{3} x^{2} + 4 \, b c^{3} d e^{3} x + {\left (b c^{4} - b\right )} e^{3}\right )} \arctan \left (d x + c\right )}{12 \, d} \]

[In]

integrate((d*e*x+c*e)^3*(a+b*arctan(d*x+c)),x, algorithm="fricas")

[Out]

1/12*(3*a*d^4*e^3*x^4 + (12*a*c - b)*d^3*e^3*x^3 + 3*(6*a*c^2 - b*c)*d^2*e^3*x^2 + 3*(4*a*c^3 - b*c^2 + b)*d*e
^3*x + 3*(b*d^4*e^3*x^4 + 4*b*c*d^3*e^3*x^3 + 6*b*c^2*d^2*e^3*x^2 + 4*b*c^3*d*e^3*x + (b*c^4 - b)*e^3)*arctan(
d*x + c))/d

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 231 vs. \(2 (61) = 122\).

Time = 23.08 (sec) , antiderivative size = 231, normalized size of antiderivative = 3.21 \[ \int (c e+d e x)^3 (a+b \arctan (c+d x)) \, dx=\begin {cases} a c^{3} e^{3} x + \frac {3 a c^{2} d e^{3} x^{2}}{2} + a c d^{2} e^{3} x^{3} + \frac {a d^{3} e^{3} x^{4}}{4} + \frac {b c^{4} e^{3} \operatorname {atan}{\left (c + d x \right )}}{4 d} + b c^{3} e^{3} x \operatorname {atan}{\left (c + d x \right )} + \frac {3 b c^{2} d e^{3} x^{2} \operatorname {atan}{\left (c + d x \right )}}{2} - \frac {b c^{2} e^{3} x}{4} + b c d^{2} e^{3} x^{3} \operatorname {atan}{\left (c + d x \right )} - \frac {b c d e^{3} x^{2}}{4} + \frac {b d^{3} e^{3} x^{4} \operatorname {atan}{\left (c + d x \right )}}{4} - \frac {b d^{2} e^{3} x^{3}}{12} + \frac {b e^{3} x}{4} - \frac {b e^{3} \operatorname {atan}{\left (c + d x \right )}}{4 d} & \text {for}\: d \neq 0 \\c^{3} e^{3} x \left (a + b \operatorname {atan}{\left (c \right )}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((d*e*x+c*e)**3*(a+b*atan(d*x+c)),x)

[Out]

Piecewise((a*c**3*e**3*x + 3*a*c**2*d*e**3*x**2/2 + a*c*d**2*e**3*x**3 + a*d**3*e**3*x**4/4 + b*c**4*e**3*atan
(c + d*x)/(4*d) + b*c**3*e**3*x*atan(c + d*x) + 3*b*c**2*d*e**3*x**2*atan(c + d*x)/2 - b*c**2*e**3*x/4 + b*c*d
**2*e**3*x**3*atan(c + d*x) - b*c*d*e**3*x**2/4 + b*d**3*e**3*x**4*atan(c + d*x)/4 - b*d**2*e**3*x**3/12 + b*e
**3*x/4 - b*e**3*atan(c + d*x)/(4*d), Ne(d, 0)), (c**3*e**3*x*(a + b*atan(c)), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 370 vs. \(2 (64) = 128\).

Time = 0.29 (sec) , antiderivative size = 370, normalized size of antiderivative = 5.14 \[ \int (c e+d e x)^3 (a+b \arctan (c+d x)) \, dx=\frac {1}{4} \, a d^{3} e^{3} x^{4} + a c d^{2} e^{3} x^{3} + \frac {3}{2} \, a c^{2} d e^{3} x^{2} + \frac {3}{2} \, {\left (x^{2} \arctan \left (d x + c\right ) - d {\left (\frac {x}{d^{2}} + \frac {{\left (c^{2} - 1\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{3}} - \frac {c \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{3}}\right )}\right )} b c^{2} d e^{3} + \frac {1}{2} \, {\left (2 \, x^{3} \arctan \left (d x + c\right ) - d {\left (\frac {d x^{2} - 4 \, c x}{d^{3}} - \frac {2 \, {\left (c^{3} - 3 \, c\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{4}} + \frac {{\left (3 \, c^{2} - 1\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{4}}\right )}\right )} b c d^{2} e^{3} + \frac {1}{12} \, {\left (3 \, x^{4} \arctan \left (d x + c\right ) - d {\left (\frac {d^{2} x^{3} - 3 \, c d x^{2} + 3 \, {\left (3 \, c^{2} - 1\right )} x}{d^{4}} + \frac {3 \, {\left (c^{4} - 6 \, c^{2} + 1\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{5}} - \frac {6 \, {\left (c^{3} - c\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{5}}\right )}\right )} b d^{3} e^{3} + a c^{3} e^{3} x + \frac {{\left (2 \, {\left (d x + c\right )} \arctan \left (d x + c\right ) - \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} b c^{3} e^{3}}{2 \, d} \]

[In]

integrate((d*e*x+c*e)^3*(a+b*arctan(d*x+c)),x, algorithm="maxima")

[Out]

1/4*a*d^3*e^3*x^4 + a*c*d^2*e^3*x^3 + 3/2*a*c^2*d*e^3*x^2 + 3/2*(x^2*arctan(d*x + c) - d*(x/d^2 + (c^2 - 1)*ar
ctan((d^2*x + c*d)/d)/d^3 - c*log(d^2*x^2 + 2*c*d*x + c^2 + 1)/d^3))*b*c^2*d*e^3 + 1/2*(2*x^3*arctan(d*x + c)
- d*((d*x^2 - 4*c*x)/d^3 - 2*(c^3 - 3*c)*arctan((d^2*x + c*d)/d)/d^4 + (3*c^2 - 1)*log(d^2*x^2 + 2*c*d*x + c^2
 + 1)/d^4))*b*c*d^2*e^3 + 1/12*(3*x^4*arctan(d*x + c) - d*((d^2*x^3 - 3*c*d*x^2 + 3*(3*c^2 - 1)*x)/d^4 + 3*(c^
4 - 6*c^2 + 1)*arctan((d^2*x + c*d)/d)/d^5 - 6*(c^3 - c)*log(d^2*x^2 + 2*c*d*x + c^2 + 1)/d^5))*b*d^3*e^3 + a*
c^3*e^3*x + 1/2*(2*(d*x + c)*arctan(d*x + c) - log((d*x + c)^2 + 1))*b*c^3*e^3/d

Giac [F]

\[ \int (c e+d e x)^3 (a+b \arctan (c+d x)) \, dx=\int { {\left (d e x + c e\right )}^{3} {\left (b \arctan \left (d x + c\right ) + a\right )} \,d x } \]

[In]

integrate((d*e*x+c*e)^3*(a+b*arctan(d*x+c)),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.75 (sec) , antiderivative size = 371, normalized size of antiderivative = 5.15 \[ \int (c e+d e x)^3 (a+b \arctan (c+d x)) \, dx=\mathrm {atan}\left (c+d\,x\right )\,\left (b\,c^3\,e^3\,x+\frac {3\,b\,c^2\,d\,e^3\,x^2}{2}+b\,c\,d^2\,e^3\,x^3+\frac {b\,d^3\,e^3\,x^4}{4}\right )-x^3\,\left (\frac {d^2\,e^3\,\left (b-20\,a\,c\right )}{12}+\frac {2\,a\,c\,d^2\,e^3}{3}\right )+x^2\,\left (\frac {c\,\left (\frac {d^2\,e^3\,\left (b-20\,a\,c\right )}{4}+2\,a\,c\,d^2\,e^3\right )}{d}+\frac {d\,e^3\,\left (10\,a\,c^2-b\,c+a\right )}{2}-\frac {a\,d\,e^3\,\left (4\,c^2+4\right )}{8}\right )+x\,\left (\frac {c\,e^3\,\left (20\,a\,c^2-3\,b\,c+6\,a\right )}{2}+\frac {\left (4\,c^2+4\right )\,\left (\frac {d^2\,e^3\,\left (b-20\,a\,c\right )}{4}+2\,a\,c\,d^2\,e^3\right )}{4\,d^2}-\frac {2\,c\,\left (\frac {2\,c\,\left (\frac {d^2\,e^3\,\left (b-20\,a\,c\right )}{4}+2\,a\,c\,d^2\,e^3\right )}{d}+d\,e^3\,\left (10\,a\,c^2-b\,c+a\right )-\frac {a\,d\,e^3\,\left (4\,c^2+4\right )}{4}\right )}{d}\right )+\frac {a\,d^3\,e^3\,x^4}{4}-\frac {b\,e^3\,\mathrm {atan}\left (\frac {\frac {b\,c\,e^3\,\left (c^2+1\right )\,\left (c-1\right )\,\left (c+1\right )}{4}+\frac {b\,d\,e^3\,x\,\left (c^2+1\right )\,\left (c-1\right )\,\left (c+1\right )}{4}}{\frac {b\,e^3}{4}-\frac {b\,c^4\,e^3}{4}}\right )\,\left (c^2+1\right )\,\left (c-1\right )\,\left (c+1\right )}{4\,d} \]

[In]

int((c*e + d*e*x)^3*(a + b*atan(c + d*x)),x)

[Out]

atan(c + d*x)*((b*d^3*e^3*x^4)/4 + b*c^3*e^3*x + (3*b*c^2*d*e^3*x^2)/2 + b*c*d^2*e^3*x^3) - x^3*((d^2*e^3*(b -
 20*a*c))/12 + (2*a*c*d^2*e^3)/3) + x^2*((c*((d^2*e^3*(b - 20*a*c))/4 + 2*a*c*d^2*e^3))/d + (d*e^3*(a - b*c +
10*a*c^2))/2 - (a*d*e^3*(4*c^2 + 4))/8) + x*((c*e^3*(6*a - 3*b*c + 20*a*c^2))/2 + ((4*c^2 + 4)*((d^2*e^3*(b -
20*a*c))/4 + 2*a*c*d^2*e^3))/(4*d^2) - (2*c*((2*c*((d^2*e^3*(b - 20*a*c))/4 + 2*a*c*d^2*e^3))/d + d*e^3*(a - b
*c + 10*a*c^2) - (a*d*e^3*(4*c^2 + 4))/4))/d) + (a*d^3*e^3*x^4)/4 - (b*e^3*atan(((b*c*e^3*(c^2 + 1)*(c - 1)*(c
 + 1))/4 + (b*d*e^3*x*(c^2 + 1)*(c - 1)*(c + 1))/4)/((b*e^3)/4 - (b*c^4*e^3)/4))*(c^2 + 1)*(c - 1)*(c + 1))/(4
*d)